using System;
using System.Windows.Markup;

namespace Zuehlke.Blueprint.Quickstart.Architecture.Presentation.UserInterface.ValueConverters
{
    /// <summary>
    /// Base class for Value converters which are also a <see cref="MarkupExtension"/> returning themself as 
    /// value.
    /// 
    /// Usage example:
    /// <![CDATA[
    /// <Button Visibility={Binding Converter={z:XYConverter}} />
    /// ]]>
    /// </summary>
    public abstract class ValueConverterMarkupExtensionBase : MarkupExtension
    {
        /// <summary>
        /// <see cref="MarkupExtension.ProvideValue"/>
        /// </summary>
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return this;
        }
    }
}